﻿CREATE TABLE [dbo].[RegistrosCompras] (
    [IdRegistro] INT NOT NULL,
    [IdCompra]   INT NOT NULL,
    CONSTRAINT [PK_RegistrosCompras] PRIMARY KEY CLUSTERED ([IdRegistro] ASC),
    CONSTRAINT [FK_RegistrosCompras_Compras] FOREIGN KEY ([IdCompra]) REFERENCES [dbo].[Compras] ([IdCompra]),
    CONSTRAINT [FK_RegistrosCompras_Registros] FOREIGN KEY ([IdRegistro]) REFERENCES [dbo].[Registros] ([IdRegistro])
);

